import request from '@/utils/request'

export function findRolesByUserAllNew(data) {
  return request({
    url: '/findRolesByUserAllNew',
    method: 'post',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA
  })
}

export function saveRolesNew(data) {
  return request({
    url: '/saveRolesNew',
    method: 'post',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA
  })
}
export function updateRolesNew(data) {
  return request({
    url: '/updateRolesNew',
    method: 'post',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA
  })
}

//菜单查询
export function queryMenusAll(data) {
  return request({
    url: '/menus/all',
    method: 'get',
    params: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA
  })
}
// 保存菜单
export function setMenuToRole(data) {
  return request({
    url: '/setMenuToRole',
    method: 'post',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA
  })
}
//
export function queryFindById(data) {
  return request({
    url: '/menus/findById',
    method: 'get',
    params: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA
  })
}
